package com.zhu.char05

/**
 *
 * @version 1.0
 * @author study
 * @date 2020/9/3 15:25
 *
 */
object Scala02_TestFun {
  def main(args: Array[String]): Unit = {
    //1 无参数，无返回值
    def f1(): Unit = {
      println("无参数")
    }

    //无参数，有返回值
    def f2(): Int = {
      println("无参，有返回值")
      10;
    }

    def f3(name: String): Unit = {
      println()
    }

    def f4(name: String): String = {
      name
    }


    println(f4("scala"))
  }
}
